import {Sequelize} from "sequelize"

export const sequelize = new Sequelize ({
    dialect: 'sqlite',
    storage:'./db.db'
})
export const sync =async()=>{
    let{Blog} =await import ('../model/Blog.js')
    await sequelize.sync({force:true})
    let arr =[
        {
            title:'1122',
            author:'思思'
        },
        {
            title:'1122',
            author:'万科紫'
        },
        {
            title:'1122',
            author:'利达'
        },
        {
            title:'1122',
            author:'王力宏'
        },
        {
            title:'1122',
            author:'流行歌'
        }
        
    ]
    Blog.bulkCreate(arr)
}